<%-- 
    Document   : cliente
    Created on : 12/07/2014, 01:04:10 AM
    Author     : MilerIvan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="_sub/_librerias.jsp" %>

<%@include file="_sub/_head.jsp" %> 
<%@include file="_sub/_menu.jsp" %>
<div id="page-wrapper">  
    <div class="row">
        <sj:tabbedpanel id="localtabs">
            <sj:tab id="tab1" target="tone" label="Ingresar Cliente"/>
            <sj:tab id="tab2" target="ttwo" label="Listar Clientes"/>
            <sj:tab id="tab3" target="tree" label="Clientes Frecuentes"/>

            <div id="tone">
                <div style="background-color:#ffff33; color:red;font-weight: bolder; margin-left:10px" >
                    <s:actionerror></s:actionerror></div>
                    <div style="background-color:#ffff33; color:green;font-weight: bolder">
                    <s:actionmessage></s:actionmessage></div>
                    
                <s:form action="IngresarClienteXML">


                    <s:textfield name="raz" label="Razon Social"></s:textfield>
                    <s:textfield name="dir" label="Direccion"></s:textfield>
                    <s:textfield name="ruc" label="Ruc"></s:textfield>


                    <s:submit value="Guardar"></s:submit>
                    <s:reset value="Cancelar"></s:reset>
                </s:form>


            </div>
            <div id="ttwo">
                
                <div style="background-color:#ffff33; color:red;font-weight: bolder; margin-left:10px" >
                    <s:actionerror></s:actionerror></div>
                    <div style="background-color:#ffff33; color:green;font-weight: bolder">
                    <s:actionmessage></s:actionmessage></div>
                    <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>RAZON SOCIAL</th>                                                                                                                  
                                <th>DIRECCION</th>
                                <th>RUC</th>
                            </tr>
                        </thead>
                        <!--ITERATOR RECORRE EL ARRAYLIST_-->  
                        <!--PROPIEDAD VALUE=listadoAction-->                          
                    <s:iterator value="listadoClientes">
                        <tr>
                            <td><s:property value="cli_id"></s:property></td>
                                <!--Se carga atributo.atributoClaseAsociada-->
                                <td><s:property value="cli_razSocial"></s:property></td>
                            <td><s:property value="cli_dirFiscal"></s:property></td>
                            <td><s:property value="cli_ruc"></s:property></td>



                            </tr>
                    </s:iterator>
                </table>


            </div>

            <div id="tree">    
                <sjc:chart
                    id="charB1"
                    cssStyle="width: 600px; height: 400px"
                    draggable="true"
                    autoResize="true">
                    <s:iterator value="listadoClientesFrecuentes">
                        <sjc:chartData
                            id="idDataA1"
                            label="%{cli_razSocial}"
                            bars="{show:true,barWidth:1}"
                            data="[[%{contadorcli},%{cantidadCli}]]"></sjc:chartData>




                    </s:iterator>

                </sjc:chart>

            </div>

        </div>

    </sj:tabbedpanel>
</div>
<!-- /.row -->

</div> 
<script>
    $(document).ready(function() {
        $('#dataTables-example').dataTable();
    });
    </script>
<%@include file="_sub/_footer.jsp" %>